Skip to content

feat(kms-connector): user decryption request verification#2345

Draft
eudelins-zama wants to merge 7 commits intofeat/RFC-012-016from
eudelins/feat/1288/kms-connector-rfc-016
Draft

feat(kms-connector): user decryption request verification#2345
eudelins-zama wants to merge 7 commits intofeat/RFC-012-016from
eudelins/feat/1288/kms-connector-rfc-016

Conversation

@eudelins-zama
Copy link
Copy Markdown
Contributor

@cla-bot cla-bot Bot added the cla-signed label Apr 21, 2026
@maksymsur maksymsur self-requested a review April 23, 2026 08:43
Comment on lines +262 to +263
startTimestamp: U256::from(start_timestamp as u64),
durationSeconds: U256::from(duration_seconds as u64),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The concern here is the unchecked as u64 cast. A negative or corrupt DB value would wrap silently into a large positive number. u64::try_from(...) would be safer.

for r in rows {
if e.payload.signature.to_vec() == r.try_get::<Vec<u8>, _>("signature")?
&& e.payload.userAddress
== Address::from(r.try_get::<[u8; 20], _>("user_address")?)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try_from ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants